<%inherit file="base.html"/>

<%block name="content">
<div class="king-layout2-main mt15" style="width:960px;">
    <div class="panel panel-default mb0">
        <div class="panel-heading"> 历史操作记录</div>
        <div class="panel-body">
            <table class="table mb0 pr15 ranger-box2  " id="table-opt">
                <thead>
                <tr>
                    <th style="width: 70px;">#</th>
                    <th>IP</th>
                    <th>操作人</th>
                    <th>操作时间</th>
                    <th>操作类型</th>
                </tr>
                </thead>
                <tbody id="tbody-opt">
                % for history in histories:
                <tr>
                    <td style="width: 70px;">${history.id}</td>
                    <td>${history.ip}</td>
                    <td>${history.user}</td>
                    <td>${history.create_time}</td>
                    <td>${history.action}</td>
                </tr>
                % endfor
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>
    $(function () {

        var language = {
            search: '搜索：',
            lengthMenu: "每页显示 _MENU_ 记录",
            zeroRecords: "没找到相应的数据！",
            info: "分页 _PAGE_ / _PAGES_",
            infoEmpty: "暂无数据！",
            infoFiltered: "(从 _MAX_ 条数据中搜索)",
            paginate: {
                first: '<<',
                last: '>>',
                previous: '上一页',
                next: '下一页',
            }
        }

        $('#table-opt').dataTable({
            paging: true,
            ordering: false,
            info: false,
            searching: true,
            pageLength: 5,
            lengthChange: false,
            language: language
        });
    });
</script>
</%block>